<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Zip-based phars</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="phar.fileformat.tar.html">« Tar-based phars</a></li>
      <li style="float: right;"><a href="phar.fileformat.phar.html">Phar File Format »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="phar.fileformat.html">What makes a phar a phar and not a tar or a zip?</a></li>
    <li>Zip-based phars</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="phar.fileformat.zip" class="section">
  <h2 class="title">Zip-based phars</h2>
  <p class="para">
   Archives based on the zip file format support several features built into
   the zip file format.  Per-file and whole-archive metadata is stored in
   the zip file comment and zip archive comment as a serialized string.  Pre-existing
   zip comments will be successfully read as a string.  Per-file compression
   read/write is supported with zlib DEFLATE compression, and read access is supported
   with bzip2 compression.  There is no limit on the number of files
   within a zip-based phar archive.  Empty directories are stored in the zip archive
   as files with a trailing slash like <code class="literal">my/directory/</code>
  </p>
 </div></div></div></body></html>